<!--添加菜单-->
<div class="btn-group" role="group" aria-label="...">
          <a href="{:U('Award/add_award_index')}"><button type="button" class="btn btn-primary">添加优惠券</button></a>          
</div>
<div id="data_page" class="in_page">
  <div class="panel panel-default">
</div>
      <table class="table table-bordered" style="text-align:center">
        <thead>
          <tr>
            <th><span class="glyphicon glyphicon-leaf"></span>券名</th>
            <th><span class="glyphicon glyphicon-leaf"></span>总数量</th>
            <th><span class="glyphicon glyphicon-leaf"></span>剩余数量</th>
            <th><span class="glyphicon glyphicon-leaf"></span>类型</th>
            <th><span class="glyphicon glyphicon-leaf"></span>创建时间</th>
            <th><span class="glyphicon glyphicon-leaf"></span>最后操作时间</th>
            <th><span class="glyphicon glyphicon-leaf"></span>开始时间</th>
            <th><span class="glyphicon glyphicon-leaf"></span>截止时间</th>
            <th><span class="glyphicon glyphicon-leaf"></span>操作</th>
          </tr>     
        </thead>
        <tbody>
         <volist name="list" id="data">
          <tr>
            <td>{$data['name']}</td>
            <td>{$data['num']}</td>
            <td>{$data['num']-$data['balance']}</td>
            <td>
              <if condition="$data['type'] eq '1'">打折券</if>
              <if condition="$data['type'] eq '2'">服务券</if>
              <if condition="$data['type'] eq '3'">节日生日券</if>
              <if condition="$data['type'] eq '4'">活动入场券</if>
            </td>
            <td>{$data['ctime']}</td>
            <td>{$data['mtime']}</td>
            <td><?php echo date('Y-m-d H:i:s',$data['starttime']);?></td>
            <td><?php echo date('Y-m-d H:i:s',$data['endtime']);?></td>            
            <td>
               <div class="btn-group" role="group" aria-label="...">
                  <a href="{:U('Award/update_award_index',array('id'=>$data['id']))}"><button type="button" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-ok"></span></button></a>
                  <a href="{:U('Award/del_award',array('id'=>$data['id']))}"  onclick="return confirm('是否确认删除？')"><button type="button" class="btn btn-xs btn-default"><span class="glyphicon glyphicon-trash"></span></button></a>
               </div>
           </td>
          </tr>
        </volist>
        </tbody>
      </table> 
</div>